Skip to content

cockpit: chats you can find, each a messenger - #230

Merged
LittleChimera merged 1 commit into
stagingfrom
factory/ui-chats
Nov 6, 2026
Merged

LittleChimera merged 1 commit into
stagingfrom
factory/ui-chats

Conversation

@LittleChimera

Copy link
Copy Markdown

Related issue

Closes # (cockpit UI iteration, part 2 of 3)

Summary

Luka: "chat feel wonky and too verbose. and i feel like i cannot find the chats that i wrote in."

ELI5: Chats (in the sidebar since #229) lists every conversation, yours first. Clicking one now opens it like a normal messenger: the name and who answers at the top, the newest message at the bottom, the box at the bottom. When you press Enter the message shows right away as "Sending…"; if the server refuses, your words come back into the box with the reason. Long agent messages fold to six lines with "more".

‹ Chats   Factory chat  with Atlas            Open its page ›
──────────────────────────────────────────────────────────────
Activity · 6 ›                       (system events live here)
L  you    I want an assistant in the app …              03:09
A  Atlas  Wave 1 is under way: … (6 lines)              10:29
          more
L  you    Is the debit test green yet?        Sending…
┌──────────────────────────────────────────────────────────┐
│ Message …                                            [↑] │
└──────────────────────────────────────────────────────────┘
  • ChatThreadPage renders NodeChat with layout="page" and the thread's key: one component for the node page's chat column and for Chats, so lanes (conversation vs Activity), cards, the / menu and read marks behave the same. Its own title and the children's news are left out on the page (the page header names the chat).
  • RoomThreadView.send adds the message to the thread at once (pending, never counted as read), swaps in the server's row, drops it on a refusal; RoomComposer empties the box on Enter and restores it with Not sent: … on failure.
  • RoomMessage folds an agent's body taller than six lines (more / less).
  • Fixes two lint/type errors that came in with factory: make the cockpit fast #228 (useFactory.ts method signature, a test's possibly-undefined index), and drops the v2 Decisions page's feedback test that cockpit: one cockpit for everyone, a sidebar, Home and Demos #229 orphaned.

Test Plan

  • npx vitest run: 549 files, 10391 tests green; tsc -b, oxlint, prettier --check clean.
  • New: NodeChat.test.tsx "the chat is a messenger" (sent at once, box empties; refused words come back with the reason; long agent message folds), Cockpit.test.tsx "a chat" (thread page layout, header, back link).
  • New e2e tests/e2e_ui/factory_v3/test_v3_chats.py on a real server (1440, 390): your thread first with mine, opens as a messenger, no system events inline, box above the phone tab bar, send shows at once and stays, the list shows "You: …" after. test_v3_calm.py green.

Demo

Screenshots (1440 light/dark, 390) in wt/v3-tmp/ui-cockpit/shots/pr2/ on the build machine (chats, thread, project); attachment upload is not available from this session.

Type of change

  • Bug fix
  • Feature
  • UI / frontend change
  • Refactor / chore
  • Docs
  • Test / CI
  • Breaking change

Test coverage

  • Unit tests added / updated
  • Integration tests added / updated
  • E2E tests added / updated
  • Manual verification completed
  • Existing tests cover this change
  • Not applicable

Coverage notes

Manual: opened #factory and a project thread at 1440 and 390 against a local server seeded with seed_factory_1340, sent messages, checked the fold and the Activity line.

Changelog

Chats open as a messenger: your conversations first, a sent message shows at once, long agent messages fold

🤖 Generated with Claude Code

- /chats/<thread> opens the conversation as a page: back to Chats, who
  answers, newest at the bottom, the box at the bottom; it is the node chat
  of the thread's node (the same component as on node pages), so system
  events stay behind Activity and live cards still show
- a sent message shows at once as "Sending…" and the box empties; a refusal
  puts the words back with "Not sent: <the server's reason>"
- an agent's message longer than six lines folds under "more"
- tests: messenger send and refusal, fold, the thread page; e2e Chats on a
  real server at 1440 and 390
- web lint and type-check green again on staging (useFactory, a test)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@LittleChimera
LittleChimera merged commit fc1594b into staging Nov 6, 2026
12 of 13 checks passed
@LittleChimera
LittleChimera deleted the factory/ui-chats branch November 6, 2026 10:09
@github-actions github-actions Bot added the size/XL Pull request size: XL label Nov 6, 2026
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown

❌ UI Snapshot doesn't match the committed baseline.

If this UI change is intentional, update the baseline — each path renders in the same pinned image, so the result matches this gate:

  • Label the PR (recommended): add the update-ui-snapshot label — the bot regenerates the baseline in the pinned image, pushes it back here, and re-runs the checks.
  • Locally with Docker: run tests/e2e_ui/visual/regen_baseline_docker.sh, review the PNG, then commit + push.

Diff PNGs (expected_=baseline, actual_=your render, diff_) are in the run artifact. Full guide: tests/e2e_ui/visual/README.md.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XL Pull request size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant